import request from '@/utils/request'

export function getNaviSettings(serialno, params) {
  return request({
    url: `/api/navi/settings/${serialno}`,
    method: 'get',
    params
  })
}

export function setNaviSettings(serialno, data) {
  return request({
    url: `/api/navi/settings/${serialno}`,
    method: 'post',
    data
  })
}

export function getRtcmSettings(serialno, params) {
  return request({
    url: `/api/rtcm/settings/${serialno}`,
    method: 'get',
    params
  })
}

export function setRtcmSettings(serialno, data) {
  return request({
    url: `/api/rtcm/settings/${serialno}`,
    method: 'post',
    data
  })
}

export function getNtripSettings(serialno, params) {
  return request({
    url: `/api/ntrip/settings/${serialno}`,
    method: 'get',
    params
  })
}

export function setNtripSettings(serialno, data) {
  return request({
    url: `/api/ntrip/settings/${serialno}`,
    method: 'post',
    data
  })
}

export function systemRestart(serialno, data = []) {
  return request({
    url: `/api/systemRestart/${serialno}`,
    method: 'post',
    data
  })
}
